Skip to content

feat: allow fallback to application/json for custom registries - #314

Merged
arcanis merged 1 commit into
nodejs:mainfrom
stramel:patch-1
Oct 19, 2023
Merged

arcanis merged 1 commit into
nodejs:mainfrom
stramel:patch-1

Conversation

@stramel

@stramel stramel commented Oct 10, 2023 •

Copy link
Copy Markdown
Contributor

Hello! 👋🏼

I just ran into an issue where our custom registry doesn't support the Accept header value of application/vnd.npm.install-v1+json. By providing a fallback to application/json, corepack can support custom registries that don't support the application/vnd.npm.install-v1+json value.

I followed the article linked in the comments above this code change where it is suggested to use application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */* for fallback. I opted to drop the */* since this is a json fetch implementation but feel free to change it.

This was also referenced in #296 where @arcanis mentioned this would likely be fine.

@stramel

stramel commented Oct 19, 2023

Copy link
Copy Markdown
Contributor Author

Thank you for the review and approval @aduh95! I just wanted to follow up to see what the timeline looks like for getting this merged in and released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants